/*
 * This class calcules points that a person obtains acoording to payment history
 */

package com.src.uniandes.ecos.tsp.creditscore.algorithm;

import com.src.uniandes.ecos.tsp.creditscore.entity.Cliente;

/**
 *
 * @author Administrador
 */
public class PaymentHistory {


    /**
     * Returns the point numbers that client obtains according with this payment history
     * @param c Client that calculate the history
     * @return
     */
         double getPointsPaymentHistory(Integer codigo){
           RulesPaymentHistory rules = new RulesPaymentHistory();
           double paymentsOnTime = rules.getPointsPaymentsOnTime(codigo);
           double numberOfAccountsAsociated = rules.getPointsNumberOfAccountsAssociated(codigo);
           double pointsAccordingToDebt = rules.getPointsAccordingToDebt(codigo);
           double PointsOfNegativeRatings = rules.getPointsOfNegativeRatings(codigo);
           double result = paymentsOnTime + numberOfAccountsAsociated + pointsAccordingToDebt + PointsOfNegativeRatings;
           return result;
        }

}
